package GUI;

import java.awt.*;
import javax.swing.*;

/**
 * This class creates instance of UpdateAuthGui 	
 * to display when needed
 * @author Nofar
 */
public class UpdateAuthGui extends JPanel {
	private static final long serialVersionUID = 1L;
	private JTextArea textArea;
	private JTextArea textArea1;
	private JButton canButton;
	private JButton subButton;
	
	/**
	 * the constructor
	 */
	 public UpdateAuthGui() {
		super();
		textArea = new JTextArea();
		textArea1 = new JTextArea();
		subButton = new JButton("submit");
		canButton = new JButton("cancel");
		initialize();
	 }
	 
	/**
	 * this method initialize the UpdateAuthGui
	 */
	public void initialize(){	
		JLabel lblIcmSystem = new JLabel("update user's authorization");
		lblIcmSystem.setForeground(Color.BLUE);
		lblIcmSystem.setFont(new Font("Arial Black", Font.BOLD, 17));
		lblIcmSystem.setBounds(128, 11, 362, 50);
		add(lblIcmSystem);
		
		JLabel lblUserName = new JLabel("User Name:");
		lblUserName.setFont(new Font("Arial", Font.BOLD, 13));
		lblUserName.setBounds(47, 72, 86, 50);
		add(lblUserName);
		
		textArea.setBounds(149, 72, 207, 40);
		add(textArea);
		textArea.setColumns(10);
		
		JLabel lblPassword = new JLabel("New authorization:");
		lblPassword.setFont(new Font("Arial", Font.BOLD, 13));
		lblPassword.setBounds(23, 138, 122, 60);
		add(lblPassword);
		
		textArea1.setBounds(149, 141, 207, 40);
		add(textArea1);
		textArea1.setColumns(10);
		
		subButton.setFont(new Font("Arial", Font.PLAIN, 12));
		subButton.setBounds(284, 218, 122, 40);
		add(subButton);
		
		canButton.setFont(new Font("Arial", Font.PLAIN, 12));
		canButton.setBounds(33, 218, 122, 40);
		add(canButton);
		
		setLayout(null);
		setSize(new Dimension(500, 300));	
	 }
	
	/**
	 * 
	 * @return JTextArea with the user name
	 */
	public JTextArea getTextArea_userName(){
		return textArea;
	}
	
	/**
	 * 
	 * @return JTextArea with the new authorization
	 */
	public JTextArea getTextArea_newAuth() {
		
		return textArea1;
	}
	/**
	 * 
	 * @return the submit button
	 */
	public JButton getSubButt(){
		return subButton;
	}
	/**
	 * 
	 * @return the cancel button
	 */
	public JButton getCanButt(){
		return canButton;
	}

}
